#pragma once
#include <d3d9.h>
#include <d3dx9.h>

void ComputeQuaternionW(D3DXQUATERNION& q);

void QuatInvs ( D3DXQUATERNION& q, D3DXQUATERNION& qInvs );
void QuatNormalize ( D3DXQUATERNION& q, D3DXQUATERNION& qOut ); 
void QuatMulQuat ( D3DXQUATERNION& q1, D3DXQUATERNION& q2, D3DXQUATERNION& out );
void QuatMulVec ( D3DXQUATERNION& q, D3DXVECTOR3& v, D3DXQUATERNION& out );
void QuatLinearInterp( D3DXQUATERNION& q1, D3DXQUATERNION& q2, float t, D3DXQUATERNION& out );

void QuatRotatePoint ( D3DXQUATERNION& q, D3DXVECTOR3& v, D3DXVECTOR3& out ); 
void QuatRotatePointMat ( D3DXQUATERNION& q, D3DXVECTOR3&v, D3DXVECTOR3& out );

void QuatToMatrix ( D3DXQUATERNION& q,D3DXMATRIX& mat);
